package com.java.socket;

public class User {
	private int uId;
	private  String uName;
	private int gid;
	public User(int id, String name,int gid) {
		super();
		uId = id;
		uName = name;
		this.gid=gid;
	}
	public int getUId() {
		return uId;
	}
	public void setUId(int id) {
		uId = id;
	}
	public String getUName() {
		return uName;
	}
	public void setUName(String name) {
		uName = name;
	}
	
	public int getGid() {
		return gid;
	}
	public void setGid(int gid) {
		this.gid = gid;
	}
	public int hashCode() {
		return this.uName.hashCode()^this.uId^this.gid^1000000;
	}
	public boolean equals(Object obj) {
		if(obj instanceof User){
			User u1=(User)obj;
			if(this.uName.equals(u1.uName)&&this.uId==u1.uId){
				return true;
			}
		}
		return true;
	}

	
	
}
